home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADEP.IN_ / oemnadep.inf
INI File  |  1996-07-12  |  35KB  |  913 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     IEEPRO
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. ParamInf        = "NCPARAM.INF"
  12. subroutineinf   = "SUBROUTN.INF"
  13. SoftwareType    = "driver"
  14. Exit_Code       = 0
  15. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  16. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  17. Manufacturer    =  "Microsoft"
  18. ProductMajorVersion     = "4"
  19. ProductMinorVersion     = "0"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "IEEPRO"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ieepro.sys"
  23. NetRuleSoftwareType     = "eproSys ndisDriver eproDriver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """EPROSys"" yes no container"
  26. NetRuleSoftwareClass    = {"eproDriver basic"}
  27. NetRuleSoftwareBindable = {"eproDriver eproAdapter non exclusive 100"}
  28. ProductHardwareName     = "IEEPRO"
  29. NetRuleHardwareType     = "epro eproAdapter"
  30. NetRuleHardwareBindForm = " yes yes container"
  31. NetRuleHardwareClass    = {"eproAdapter basic"}
  32. ProductOpSupport     = 134 
  33. ProductMCAOpSupport  = 132 
  34. EE16_1BYTE      = 139
  35. EE16_2BYTE      = 98
  36. NETCARD_ID      = 25227
  37. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  38. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  39. [GeneralConstants]
  40. from      = ""
  41. to        = ""
  42. ExitCodeOk     = 0
  43. ExitCodeCancel = 1
  44. ExitCodeFatal  = 2
  45. KeyNull         = ""
  46. MAXIMUM_ALLOWED   = 33554432
  47. RegistryErrorIndex = NO_ERROR
  48. KeyProduct      = ""
  49. KeyParameters   = ""
  50. TRUE            = 1
  51. FALSE           = 0
  52. NoTitle         = 0
  53. ExitState   = "Active"
  54. OldVersionExisted = $(FALSE)
  55. DriverPath      = $(!STF_NTPATH)\drivers
  56. [date]
  57.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  58. [Identify]
  59.     read-syms Identification
  60.     set Status     = STATUS_SUCCESSFUL
  61.     set Identifier = $(OptionType)
  62.     set Media      = #("Source Media Descriptions", 1, 1)
  63.     Return $(Status) $(Identifier) $(Media)
  64. [ReturnOptions]
  65.     set Status        = STATUS_FAILED
  66.     set OptionList     = {}
  67.     set OptionTextList = {}
  68.     set LanguageList = ^(LanguagesSupported, 1)
  69.     Ifcontains(i) $($0) in $(LanguageList)
  70.     ifstr(i) $($1) == ""
  71.         goto returnoptions
  72.     endif
  73.     set PlatformList = ^(PlatformsSupported, 1)
  74.     Ifcontains(i) $($1) in $(PlatformList)
  75.         goto returnoptions
  76.     else
  77.         set Status = STATUS_NOTSUPPORTED
  78.         goto finish_ReturnOptions
  79.     endif
  80.     else
  81.     set Status = STATUS_NOLANGUAGE
  82.     goto finish_ReturnOptions
  83.     endif
  84. returnoptions = +
  85.     set OptionList     = ^(Options, 1)
  86.     set OptionTextList = ^(OptionsText$($0), 1)
  87.     set Status         = STATUS_SUCCESSFUL
  88. finish_ReturnOptions = +
  89.     Return $(Status) $(OptionList) $(OptionTextList)
  90. [InstallOption]
  91.     Debug-Output "At InstallOption"
  92.     set Status   = STATUS_FAILED
  93.     set Option   = $($1)
  94.     set SrcDir   = $($2)
  95.     set AddCopy  = $($3)
  96.     set DoCopy   = $($4)
  97.     set DoConfig = $($5)
  98.     set LanguageList = ^(LanguagesSupported, 1)
  99.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  100.     Return STATUS_NOLANGUAGE
  101.     endif
  102.     set-subst LF = "\n"
  103.     read-syms GeneralConstants
  104.     read-syms FileConstants
  105.     read-syms DialogConstants$(!STF_LANGUAGE)
  106.     ifstr(i) $(!NTN_Origination) == "NCPA"
  107.     set Continue = "OK"
  108.     endif
  109.     read-syms FileConstants$(!STF_LANGUAGE)
  110.     detect date
  111.     set-title  $(FunctionTitle)
  112.     set to   = Begin
  113.     set from = Begin
  114.     Set MachineType = $(!STF_BUSTYPE)
  115.     Debug-Output "MachineType is: "$(MachineType)
  116.     set CommonStatus = STATUS_SUCCESSFUL
  117.     EndWait
  118. Begin = +
  119.     Debug-Output "At Begin"
  120.     Set ActivateDetection = FALSE
  121.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  122.         set StartLabel = removeadapter
  123.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  124.         set StartLabel = UpgradeSoftware
  125.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  126.         set StartLabel = bindingadapter
  127.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  128.         set ActivateDetection = TRUE
  129.         set StartLabel = configureadapter
  130.         ifstr(i) $(MachineType) == "MCA"
  131.             Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  132.                 Debug-Output "Cannot configure the EtherExpress MCA driver software."
  133.                 Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  134.             else
  135.                 Debug-Output "Cannot configure the EtherExpress MCA adapter card."
  136.                 Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  137.             endif
  138.             set Error = $($R0)
  139.             set from = end
  140.             set to = end
  141.             goto nonfatalinfo
  142.         endif
  143.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  144.             Debug-Output "Cannot configure the 82595 driver software."
  145.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  146.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  147.             Debug-Output "ShellCode error: cannot get an error string."
  148.             goto ShellCodeError
  149.             endif
  150.             set Error = $($R0)
  151.             set from = end
  152.             set to = end
  153.             goto nonfatalinfo
  154.         endif
  155.     else
  156.         set ActivateDetection = TRUE
  157.         set StartLabel = installadapter
  158.         set OEM_ABANDON_OPTIONS = {}
  159.         set OEM_ABANDON_SOFTWARE = FALSE
  160.         set OEM_ABANDON_ON = TRUE   
  161.     endif
  162.     Debug-Output "OEMNADEP.INF: =================================================="
  163.     Debug-Output "OEMNADEP.INF: STF_CWDIR is: "$(!STF_CWDIR)
  164.     Debug-Output "OEMNADEP.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  165.     Debug-Output "OEMNADEP.INF: Option is: "$(Option)
  166.     Debug-Output "OEMNADEP.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  167.     Debug-Output "OEMNADEP.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  168.     Debug-Output "OEMNADEP.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  169.     Debug-Output "OEMNADEP.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  170.     Debug-Output "OEMNADEP.INF: MachineType is: "$(MachineType)
  171.     Debug-Output "OEMNADEP.INF: =================================================="
  172.     Set DetectedCard = FALSE
  173.     Ifstr(i) $(ActivateDetection) != TRUE
  174.         Goto $(StartLabel)
  175.     Endif
  176.     Set TypeList = {{IRQ,IRQList,IRQValue},+
  177.                     {IOADDR, IOAddrValues, IOAddrValue},+
  178.                     {IOCHANNELREADY, IOReadyList_ignore, IOReadyCBI},+
  179.                     {TRANSCEIVER, TransceiverList_ignore, TransceiverCBI}+
  180.                     }
  181.     Debug-Output "OEMNADEP.INF: Calling Param_BuildTypeLists"
  182.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  183.     Set Status = $($R0)
  184.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  185.         Goto fataldetect
  186.     Endif
  187.     Debug-Output "OEMNADEP.INF: Calling Param_SetDefaults"
  188.     Shell $(ParamInf) Param_SetDefaults {}
  189.     Shell $(ParamInf) HexListFromDecList $(IOAddrValues)
  190.     Set IOAddrList = $($R0)
  191.     Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  192.     Set IRQList = $($R0)
  193.     Ifstr(i) $(!STF_NCDETECT) == YES
  194.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  195.            Set DetectedCard = TRUE
  196.            Debug-Output "OEMNADEP.INF: Setting DetectedCard to TRUE"
  197.         Endif
  198.     Endif
  199.     set IOAddrCBI = ~($(IOAddrValues),$(IOAddrValue))
  200.     set IRQCBI = ~($(IRQList),$(IRQValue))
  201.     set IOReadyValue = *($(IOReadyList), $(IOReadyCBI))
  202.     set TransceiverValue = *($(TransceiverList), $(TransceiverCBI))
  203.     Shell "" DebugConfiguration "After parameter querying"
  204.     Set from = $(fatal)
  205.     Set to = $(fatal)
  206.     Goto $(StartLabel)
  207. installadapter = +
  208.     Debug-Output "At installadapter"
  209.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  210.     Ifstr $(KeyProduct) != $(KeyNull)
  211.         CloseRegKey $(KeyProduct)
  212.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  213.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareDescription),+
  214.                $(ProductVersion)
  215.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  216.                Debug-Output "ShellCode error: cannot get an error string."
  217.                goto ShellCodeError
  218.            endif
  219.            goto end
  220.         else
  221.            Shell $(UtilityInf), CardExistedDlg
  222.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  223.                Debug-Output "ShellCode error: cannot get an error string."
  224.                goto ShellCodeError
  225.            endif
  226.            ifstr(i) $($R1) != "OK"
  227.                goto end
  228.            endif
  229.            set OldVersionExisted = $(TRUE)
  230.         endif
  231.     endif
  232.     Ifstr(i) $(DetectedCard) != TRUE
  233.         Goto adaptersetup
  234.     Endif
  235. CheckForISA = +
  236.     Debug-Output "At CheckForISA"
  237.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  238.     EndWait
  239.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  240.         Debug-Output "OEMNADEP.INF: Calling Param_QueryCard returned an error!"
  241.         Goto adaptersetup
  242.     Endif
  243.     Set DetectedParams = $($R1)
  244.     Debug-Output "OEMNADEP.INF: Calling Param_SetDefaults to merge detected params"
  245.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  246.     set IOAddrCBI = ~($(IOAddrValues),$(IOAddrValue))
  247.     set IRQCBI = ~($(IRQList),$(IRQValue))
  248.     set IOReadyValue = *($(IOReadyList), $(IOReadyCBI))
  249.     set TransceiverValue = *($(TransceiverList), $(TransceiverCBI))
  250.     goto adaptersetup
  251. configureadapter = +
  252.     Debug-Output "At configureadapter"
  253.     SetHelpFile "eepro.hlp" 1 6
  254.     Ifstr $(KeyProduct) == $(KeyNull)
  255.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  256.         Ifstr $(KeyProduct) == $(KeyNull)
  257.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  258.             Debug-Output "Cannot find component product key"
  259.             goto fatalregistry
  260.         Endif
  261.     Endif
  262.     Debug-Output "INF: Shelling to FindService"
  263.     Shell $(UtilityInf) FindService, $(KeyProduct)
  264.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  265.         Debug-Output "INF: FindService shell failure"
  266.         Goto ShellCodeError
  267.     Endif
  268.     Ifstr(i) $($R0) != NO_ERROR
  269.         Debug-Output "INF: FindService Shell error: "$($R0)
  270.         Goto fatalregistry
  271.     endif
  272.     Set KeyParameters = $($R2)
  273.     CloseRegKey $($R1)
  274.     Ifstr $(KeyParameters) == $(KeyNull)
  275.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  276.         Debug-Output "Cannot find component service"
  277.         goto fatalregistry
  278.     endif
  279.     set OldVersionExisted = $(TRUE)
  280.     set OldIOAddrValue = "0"
  281.     set ValueName = ""
  282.     set ValueData = ""
  283.     set ValueStr  = ""
  284.     set ValueList = {}
  285.     EnumRegValue $(KeyParameters) ValueList
  286.     ForListDo $(ValueList)
  287.         set ValueItem = $($)
  288.         set ValueName = *($(ValueItem),1)
  289.         set ValueData = *($(ValueItem),4)
  290.         Ifstr(i) $(ValueName) == "INTERRUPT"
  291.             set IRQValue = $(ValueData)
  292.             Debug-Output "OEMNADEP.INF: Registry IRQ: "$(IRQValue)
  293.         else-ifstr(i) $(ValueName) == "IOADDRESS"
  294.             set IOAddrValue = $(ValueData)
  295.             Debug-Output "OEMNADEP.INF: Registry IOAddr: "$(IOAddrValue)
  296.         else-ifstr(i) $(ValueName) == "IoChannelReady"
  297.             set IOReadyCBI = $(ValueData)
  298.             Debug-Output "OEMNADEP.INF: Registry IOChannelReady: "$(IOReadyCBI)
  299.         else-ifstr(i) $(ValueName) == "Transceiver"
  300.             set TransceiverCBI = $(ValueData)
  301.             Debug-Output "OEMNADEP.INF: Registry Transceiver: "$(TransceiverCBI)
  302.         else-ifstr(i) $(ValueName) == "BusType"
  303.             set BusInterfaceType = $(ValueData)
  304.         else-ifstr(i) $(ValueName) == "BusNumber"
  305.             set BusNumber = $(ValueData)
  306.         else-ifstr(i) $(ValueName) == "OLDIOADDRESS"
  307.             set OldIOAddrValue = $(ValueData)
  308.         endif
  309.     EndForListDo
  310.     ifstr(i) $(IRQValue) == ""
  311.         set IRQCBI = 2
  312.         set IRQValue = *($(IRQList), $(IRQCBI))
  313.         Debug-Output "OEMNADEP.INF: Setting Default IRQ"
  314.     else
  315.         set IRQCBI = ~($(IRQList),$(IRQValue))
  316.     endif
  317.     ifstr(i) $(IOAddrValue) == ""
  318.         set IOAddrCBI = 1
  319.         set IOAddrValue = *($(IOAddrValues), $(IOAddrCBI))    
  320.         Debug-Output "OEMNADEP.INF: Setting Default IOAddress"
  321.     else
  322.         set IOAddrCBI = ~($(IOAddrValues),$(IOAddrValue))
  323.     endif
  324.     ifstr(i) $(IOReadyCBI) == ""
  325.         set IOReadyCBI = 4
  326.         Debug-Output "OEMNADEP.INF: Setting Default IOChannelReady"
  327.     endif
  328.     ifstr(i) $(TransceiverCBI) == ""
  329.         set TransceiverCBI = 4
  330.         Debug-Output "OEMNADEP.INF: Setting Default Transceiver"
  331.     endif        
  332.     set IOReadyValue = *($(IOReadyList), $(IOReadyCBI))
  333.     set TransceiverValue = *($(TransceiverList), $(TransceiverCBI))
  334. adaptersetup = +
  335.     Debug-Output "At adaptersetup"
  336.     Shell "" DebugConfiguration "After List Translation"
  337.     Shell $(ParamInf) Param_ParameterConfidence
  338.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  339.         Debug-Output "OEMNADEP.INF: parameter confidence too low to bypass configuration"
  340.         Goto adapteroptions
  341.     Endif
  342.     Ifstr(i) $(DetectedCard) == TRUE
  343.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  344.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  345.             set BusNumber = *($(!STF_NCDETINFO),6)
  346.             Goto adapterverify
  347.         Endif
  348.     Endif
  349. adapteroptions = +
  350.     Debug-Output "At adapteroptions"
  351.     Set from = adapteroptions
  352.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  353.         ifstr(i) $(!AutoNetInterfaceType) != ""
  354.             set BusInterfaceType = $(!AutoNetInterfaceType)
  355.         else
  356.             set BusInterfaceType = 1    
  357.         endif
  358.         ifstr(i) $(!AutoNetBusNumber) != ""
  359.             set BusNumber = $(!AutoNetBusNumber)
  360.         else
  361.             set BusNumber = 0
  362.         endif
  363.         goto adapterverify
  364.     endif
  365.     set LastIOAddrValue = $(IOAddrValue)
  366.     set IOAddrValue = *($(IOAddrList), $(IOAddrCBI))
  367.     Shell "" DebugConfiguration "Before rause UI"
  368.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  369.     ui start "InputDlg"
  370.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  371.         Set IRQValue = $(Combo1Out)
  372.         Set IRQCBI = ~($(IRQList),$(IRQValue))
  373.         Set IOAddrCBI = ~($(IOAddrList),$(Combo2Out))
  374.         Set IOReadyValue = $(Combo3Out)
  375.         Set IOReadyCBI = ~($(IOReadyList),$(IOReadyValue))
  376.         Set TransceiverValue = $(Combo4Out)
  377.         Set TransceiverCBI = ~($(TransceiverList),$(TransceiverValue))
  378.         ui pop 1
  379.     else-ifstr(i) $(DLGEVENT) == "BACK"
  380.         set CommonStatus = STATUS_USERCANCEL
  381.         Debug-Output "Action: exit. Bye."
  382.         ui pop 1
  383.         goto end
  384.     else
  385.         Debug-Output "Action: unknown. Bye."
  386.         ui pop 1
  387.         goto end
  388.     endif
  389.     Set IOAddrValue = *($(IOAddrValues),$(IOAddrCBI))
  390.     ifint $(OldIOAddrValue) == "0"
  391.         ifint $(IOAddrValue) != $(LastIOAddrValue)
  392.             Set OldIOAddrValue = $(LastIOAddrValue)
  393.         endif
  394.     endif
  395.     ifstr(i) $(!STF_NCDETINFO) == {}
  396.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareDescription) $(BusInterfaceType) $(BusNumber)
  397.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.             Debug-Output "ShellCode error."
  399.             goto ShellCodeError
  400.         endif
  401.         set BusInterfaceType = $($R1)
  402.         set BusNumber = $($R2)
  403.     else
  404.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  405.         set BusNumber = *($(!STF_NCDETINFO),6)
  406.     endif
  407.  adapterverify = +
  408.     Debug-Output "At adapterverify"
  409.     Shell "" DebugConfiguration "after running dialog"
  410.     Ifstr(i) $(DetectedCard) != TRUE
  411.         Goto skipoptions
  412.     Endif
  413.     Debug-Output "OEMNADEP.INF: Calling Param_VerifyCard"
  414.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  415.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  416.         Debug-Output "OEMNADEP.INF: Param_VerifyCard succeeded"
  417.         Goto skipoptions
  418.     Endif
  419.     Set from = adapteroptions
  420.     Set to = skipoptions
  421.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  422.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.         Debug-Output "ShellCode error: cannot get an error string."
  424.         goto ShellCodeError
  425.     endif
  426.     set Error = $($R0)
  427.     Goto Warning
  428. skipoptions =+
  429.     Debug-Output "At skipoptions"
  430.     ifint $(OldVersionExisted) == $(TRUE)
  431.         ifstr(i) $(!NTN_InstallMode) == configure
  432.             goto writeparameters
  433.         endif
  434.     endif
  435.     StartWait
  436.     ifint $(OldVersionExisted) == $(FALSE)
  437.         ifstr(i) $(!NTN_InstallMode) == "install"
  438.            Ifstr(i) $(DoCopy) == "YES"
  439.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  440.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  441.                   Goto ShellCodeError
  442.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  443.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  444.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  445.                       goto ShellCodeError
  446.                   endif
  447.                   set Error = $($R0)
  448.                   Goto fatal
  449.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  450.                   Goto successful
  451.               Endif
  452.               Set SrcDir = $($R1)
  453.            Endif
  454.            install "Install-Option"
  455.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  456.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  457.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  458.                   goto ShellCodeError
  459.               endif
  460.               set Error = $($R0)
  461.               goto fatal
  462.            endif
  463.         endif
  464.         Debug-Output "At AddSoftwareComponent"
  465.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  466.             $(ProductSoftwareName), +
  467.             $(ProductSoftwareName), +
  468.             $(ProductSoftwareDescription), $(STF_CONTEXTINFNAME), +
  469.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  470.             $(NetEventDLL)
  471.         Set OEM_ABANDON_SOFTWARE = TRUE
  472.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  473.             Debug-Output "ShellCode error"
  474.             goto ShellCodeError
  475.         endif
  476.         set RegistryErrorIndex = $($R0)
  477.         set KeyProduct      = $($R1)
  478.         Set SoftNetRulesKey = $($R2)
  479.         CloseRegKey $($R3)
  480.         CloseRegKey $($R4)
  481.         CloseRegKey $($R5)
  482.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  483.             EndWait
  484.             Debug-Output "Registry error: add software components"
  485.             CloseRegKey $(KeyProduct)
  486.             CloseRegKey $(SoftNetRulesKey)
  487.             goto fatalregistry
  488.         endif
  489.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  490.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  491.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  492.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  493.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  494.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  495.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  496.         Debug-Output "At AddValueList - SoftwareType"
  497.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  498.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.             Debug-Output "ShellCode error."
  500.             goto ShellCodeError
  501.         endif
  502.         set RegistryErrorIndex = $($R0)
  503.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  504.             EndWait
  505.             Debug-Output "Registry error: add value list."
  506.             CloseRegKey $(KeyProduct)
  507.             CloseRegKey $(SoftNetRulesKey)
  508.             goto fatalregistry
  509.         endif
  510.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  511.                     {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  512.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  513.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  514.                     {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  515.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  516.         Debug-Output "At AddValueList - bindform"
  517.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  518.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  519.             Debug-Output "ShellCode error."
  520.             goto ShellCodeError
  521.         endif
  522.         set RegistryErrorIndex = $($R0)
  523.         CloseRegKey $(KeyProduct)
  524.         CloseRegKey $(SoftNetRulesKey)
  525.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  526.             EndWait
  527.             Debug-Output "Resgitry error: add value list."
  528.             goto fatalregistry
  529.         endif
  530.     endif
  531.     Debug-Output "At AddHardwareComponent"
  532.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  533.     ifint $($R4) != -1
  534.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  535.     endif
  536.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.         Debug-Output "Cannot add hardware component"
  538.         goto ShellCodeError
  539.     endif
  540.     set RegistryErrorIndex = $($R0)
  541.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  542.         EndWait
  543.         Debug-Output "Registry error: add hardware component"
  544.         CloseRegKey $($R1)
  545.         CloseRegKey $($R2)
  546.         CloseRegKey $($R3)
  547.         goto fatalregistry
  548.     endif
  549.     set KeyParameters = $($R3)
  550.     set KeyAdapterRules = $($R2)
  551.     set AdapterNumber = $($R4)
  552.     ifstr(i) $(MachineType) == "MCA"
  553.         set OpSupport = $(ProductMCAOpSupport)
  554.     else
  555.         set OpSupport = $(ProductOpSupport)
  556.     Endif
  557.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  558.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareDescription)},+
  559.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  560.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  561.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  562.                {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)},+
  563.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  564.     Debug-Output "At AddValueList - Manufacturer"
  565.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  566.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  567.         Debug-Output "ShellCode error"
  568.         goto ShellCodeError
  569.     endif
  570.     CloseRegKey $($R1)
  571.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  572.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  573.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  574.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  575.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  576.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  577.     Debug-Output "At AddValueList - class"
  578.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  579.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  580.         Debug-Output "ShellCode error."
  581.         goto ShellCodeError
  582.     endif
  583.     set RegistryErrorIndex = $($R0)
  584.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  585.         EndWait
  586.         Debug-Output "Resgitry error: add value list."
  587.         CloseRegKey $(KeyParameters)
  588.         CloseRegKey $(KeyAdapterRules)
  589.         goto fatalregistry
  590.     endif
  591.     CloseRegKey $(KeyAdapterRules)
  592.     goto writeparameters
  593. writeparameters = +
  594.     Debug-Output "At writeparameters"
  595.     Ifstr(i) $(MachineType) == "MCA"
  596.        set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  597.               {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  598.               {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  599.               {MediaType,$(NoTitle),$(!REG_VT_DWORD),1}}
  600.     else                       
  601.        Shell "" DebugConfiguration "Before Writing Parameters"
  602.        set NewValueList = {{INTERRUPT,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  603.               {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  604.               {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  605.               {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  606.               {IoChannelReady,$(NoTitle),$(!REG_VT_DWORD),$(IOReadyCBI)},+
  607.               {Transceiver,$(NoTitle),$(!REG_VT_DWORD),$(TransceiverCBI)},+
  608.               {OLDIOADDRESS,$(NoTitle),$(!REG_VT_DWORD),$(OldIOAddrValue)},+
  609.               {IOADDRESS,$(NoTitle),$(!REG_VT_DWORD),$(IOAddrValue)}}
  610.     endif
  611.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  612.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  613.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  614.     endif
  615.     CloseRegKey $(KeyParameters)
  616.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  617.         Debug-Output "ShellCode error."
  618.         goto ShellCodeError
  619.     endif
  620.     set RegistryErrorIndex = $($R0)
  621.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  622.         Debug-Output "Registry error: Add value list"
  623.         goto fatalregistry
  624.     endif
  625.     EndWait
  626.     goto successful
  627. bindingadapter =+
  628.     Debug-Output "At bindingadapter"
  629.     set Error = "Binding: Sorry, not yet implemented."
  630.     goto fatal
  631. removeadapter = +
  632.     Debug-Output "At removeadapter"
  633.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  634.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  635.             $(ProductSoftwareName)
  636.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  637.             Debug-Output "ShellCode error"
  638.             goto ShellCodeError
  639.         endif
  640.         set RegistryErrorIndex = $($R0)
  641.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  642.             goto fatalregistry
  643.         endif
  644.         else
  645.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  646.             $(ProductSoftwareName), $(!NTN_RegBase)
  647.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  648.             Debug-Output "ShellCode error"
  649.             goto ShellCodeError
  650.         endif
  651.         set RegistryErrorIndex = $($R0)
  652.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  653.             goto fatalregistry
  654.         endif
  655.     endif
  656.     goto end
  657. UpgradeSoftware = +
  658.     Debug-Output "At UpgradeSoftware"
  659.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  660.     Ifstr $(KeyProduct) != $(KeyNull)
  661.         install "Install-Update"
  662.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  663.             goto fatal
  664.         endif
  665.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  666.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  667.         CloseRegKey $(KeyProduct)
  668.     else
  669.         goto fatalregistry
  670.     endif
  671.     ifstr(i) $(MachineType) == "MCA"
  672.         set OpSupport = $(ProductMCAOpSupport)
  673.     else
  674.         set OpSupport = $(ProductOpSupport)
  675.     Endif
  676.     set iSearch = 1
  677. nextnetcard = +
  678.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  679.     set KeyNetcard = $($R0)
  680.     set iSearch = $($R1)
  681.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  682.     Ifstr $(KeyNetcard) != $(KeyNull)
  683.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  684.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)}
  685.         CloseRegKey $(KeyNetcard)
  686.         goto nextnetcard
  687.     Endif
  688.     goto end
  689. successful = +
  690.     Debug-Output "At successful"
  691.     goto end
  692. abandon = +
  693.     Debug-Output "At abandon"
  694.     ForListDo $(OEM_ABANDON_OPTIONS)
  695.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  696.         $(ProductSoftwareName), $($)
  697.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  698.         Debug-Output "ShellCode error"
  699.         goto ShellCodeError
  700.     endif
  701.     set RegistryErrorIndex = $($R0)
  702.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  703.         goto fatalregistry
  704.     endif
  705.     EndForListDo
  706.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  707.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  708.         $(ProductSoftwareName), FALSE
  709.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  710.         Debug-Output "ShellCode error"
  711.         goto ShellCodeError
  712.     endif
  713.     set RegistryErrorIndex = $($R0)
  714.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  715.         goto fatalregistry
  716.     endif
  717.     endif
  718.     goto end
  719. warning = +
  720.     Debug-Output "At warning"
  721.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  722.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  723.         goto ShellCodeError
  724.     endif
  725.     ifstr(i) $($R1) == "OK"
  726.         goto $(to)
  727.     else-ifstr(i) $($R1) == "CANCEL"
  728.         goto $(from)
  729.     else
  730.         goto "end"
  731.     endif
  732. nonfatalinfo = +
  733.     Debug-Output "At nonfatalinfo"
  734.     Set Severity = STATUS
  735.     Set CommonStatus = STATUS_USERCANCEL
  736.     goto nonfatalmsg
  737. nonfatal = +
  738.     Debug-Output "At nonfatal"
  739.     Set Severity = NONFATAL
  740.     goto nonfatalmsg
  741. nonfatalmsg = +
  742.     Debug-Output "At nonfatalmsg"
  743.     ifstr(i) $(Error) == ""
  744.     Set Severity = NONFATAL
  745.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  746.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  747.         goto ShellCodeError
  748.     endif
  749.     set Error = $($R0)
  750.     endif
  751.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  752.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  753.     goto ShellCodeError
  754.     endif
  755.     ifstr(i) $($R1) == "OK"
  756.     goto $(from)
  757.     else
  758.     goto "end"
  759.     endif
  760. fatalregistry = +
  761.     Debug-Output "At fatalregistry"
  762.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  763.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  764.     goto ShellCodeError
  765.     endif
  766.     set Error = $($R0)
  767.     goto fatal
  768. fataldetect = +
  769.     Debug-Output "At fataldetect"
  770.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  771.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  772.     Debug-Output "ShellCode error: cannot get an error string."
  773.     goto ShellCodeError
  774.     endif
  775.     set Error = $($R0)
  776.     Goto fatal
  777. fatal = +
  778.     Debug-Output "At fatal"
  779.     ifstr(i) $(Error) == ""
  780.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  781.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  782.         goto ShellCodeError
  783.     endif
  784.     set Error = $($R0)
  785.     endif
  786.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  787.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  788.     goto ShellCodeError
  789.     endif
  790.     goto setfailed
  791. ShellCodeError = +
  792.     Debug-Output "At ShellCodeError"
  793.     set DlgType      = "MessageBox"
  794.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  795.     set STF_MB_TEXT  = "Shell Code Error"
  796.     set STF_MB_TYPE  = 1
  797.     set STF_MB_ICON  = 3
  798.     set STF_MB_DEF   = 1
  799.     ui start "Error Message"
  800.     goto setfailed
  801. setfailed = +
  802.     Debug-Output "At setfailed"
  803.     set CommonStatus = STATUS_FAILED
  804.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  805.     set OEM_ABANDON_ON = FALSE
  806.     goto abandon
  807.     endif
  808.     goto end
  809. end = +
  810.     Debug-Output "At end"
  811.     goto term
  812. term = +
  813.     Debug-Output "At term"
  814.     Return $(CommonStatus)
  815. [DebugConfiguration]
  816.     Set InfName = "OEMNADEP.INF"
  817.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  818.     Debug-Output $(InfName)" IRQValue is "$(!p:IRQValue)" or the "$(!p:IRQCBI)"th item."
  819.     Debug-Output $(InfName)" IOAddrValue is "$(!p:IOAddrValue)" or the "$(!p:IOAddrCBI)"th item."
  820.     Debug-Output $(InfName)" IOReadyValue is "$(!p:IOReadyValue)" or the "$(!p:IOReadyCBI)"th item."
  821.     Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)" or the "$(!p:TransceiverCBI)"th item."
  822.     return
  823. [Install-Option]
  824.     Debug-Output "At Install-Option"
  825.     set STF_VITAL = ""
  826.     ifstr(i) $(AddCopy) == "YES"
  827.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  828.     endif
  829.     ifstr(i) $(DoCopy) == "YES"
  830.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  831.        CopyFilesInCopyList
  832.     endif
  833.     Exit
  834. [Install-Update]
  835.     Debug-Output "At Install-Update"
  836.    set STF_VITAL        = ""
  837.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  838.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  839.    CopyFilesInCopyList
  840.    exit
  841. [Install-Helpfile]
  842.    Debug-Output "At Install-Helpfile"
  843.    set STF_VITAL        = ""
  844.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  845.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  846.    AddSectionFilesToCopyList Files-hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  847.    CopyFilesInCopyList
  848.    exit
  849. [Source Media Descriptions]
  850.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  851. [Signature]
  852.     FileType = MICROSOFT_FILE
  853. [GetSignature]
  854.     read-syms Signature
  855.     return $(FileType)
  856. [ProductType]
  857. STF_PRODUCT  = LanmanNT
  858. STF_PLATFORM = I386
  859. [Files-Inf]
  860. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  861. [Files-IEEPRO]
  862. 1,IEEPRO.SYS , SIZE=999
  863. [LanguagesSupported]
  864.     ENG
  865. [OptionsTextENG]
  866.     IEEPRO = "Intel EtherExpress PRO Ethernet Adapter"
  867. [FileConstantsENG]
  868. ProCaption   = "Windows NT Setup"
  869. ProCancel    = "Cancel"
  870. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  871.                "Are you sure you want to cancel copying files?"
  872. ProCancelCap = "Network Setup Message"
  873. ProText1     = "Copying:"
  874. ProText2     = "To:"
  875. FunctionTitle = "Intel EtherExpress PRO Ethernet Adapter Setup"
  876. ProductSoftwareDescription = "Intel EtherExpress PRO Ethernet Driver"
  877. ProductHardwareDescription = "Intel EtherExpress PRO Ethernet Adapter"
  878. IRQList = {"3", "5", "9", "10", "11"}
  879. IOReadyList = { "Early", "Late", "Never", "Auto Detect" }
  880. IOReadyListExt = { "Early", "Late", "Never", "Auto Detect" }
  881. TransceiverList = {"Thick Net (AUI/DIX)","Thin Net (BNC/COAX)","Twisted-Pair (TPE)","Auto Connect"}
  882. [DialogConstantsENG]
  883. Help        = "&Help"
  884. Exit        = "Cancel"
  885. OK          = "OK"
  886. HelpContext = ""
  887. Continue    = "Continue"
  888. Cancel      = "Cancel"
  889. [FileDependentDlgENG]
  890. DlgType = "RadioCombination"
  891. DlgTemplate = "EE_16"
  892. Caption = $(FunctionTitle)
  893. DlgText = "Please select values for the following fields:"
  894. Combo1Label = "&Interrupt Number:"
  895. Combo2Label = "I/O &Port Address:"
  896. Combo3Label = "I/O &Channel Ready:"
  897. Combo4Label = "&Transceiver Type:"
  898. Combo1List = $(IRQList)
  899. Combo1Out  = $(IRQValue)
  900. Combo2List = $(IOAddrList)
  901. Combo2Out  = $(IOAddrValue)
  902. Combo3List = $(IOReadyList)
  903. Combo3Out  = $(IOReadyValue)
  904. Combo4List = $(TransceiverList)
  905. Combo4Out  = $(TransceiverValue)
  906. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List, Combo4List}
  907. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out, Combo4Out}
  908. EditTextIn = ""
  909. EditTextLim = ""
  910. CBOptionsGreyed = {}
  911. NotifyFields = {NO, NO}
  912. HelpContext = $(!IDH_DB_OEMNADEP_INS)
  913.